<?php

namespace Application\model;

use Cola\Model;

class VipServiceModel extends Model
{
    /**
     * 获取VIP客服配置信息
     * @param $cpid
     * @return array
     */
    public function getInfo($cpid,$srid = [])
    {
        // 获取问卷信息
        $where = "cpid = '$cpid'";
        if($srid){
            is_array($srid) && $srid = implode(',',$srid);
            $where .= " and srid in ($srid)";
        }
        $sql = "select * from gm_vip_service where $where  order by id desc";
        $service = $this->db->row($sql);
        return $service;
    }

    public function getInfo1($cpid)
    {
        // 获取问卷信息
        $sql = "select * from gm_vip_service where cpid = '$cpid' order by id desc";
        $service = $this->db->row($sql);
        return $service;
    }

    public function getLoginNoticeByCid($cid){
        // 获取问卷信息
        $sql = "select * from gm_vip_service where cid = '$cid' order by id desc";
        $service = $this->db->row($sql);
        return $service;
    }



}